//
//  UIImage+CAIWatermask.h
//  CAICategories
//
//  Created by 海参 on 2022/8/30.
//  Copyright © 2022 com.Chs. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface WatermaskImageModel : NSObject

///image
@property (nonatomic, strong) UIImage *maskImage;

///rect,如果size不设置，则不限制宽度；
@property (nonatomic, assign) CGRect boundingRect;

@end


@interface WatermaskTextModel : NSObject

///文本
@property (nonatomic, strong) NSString *text;

@property (nonatomic, strong) NSDictionary *attributes;

///rect,如果size不设置，则不限制宽度；
@property (nonatomic, assign) CGRect boundingRect;

@end

@interface UIImage (CAIWatermask)


/// 绘制水印
/// @param originalImage 原图
/// @param elements 有序水印集合，按先后顺序依次绘制；
+ (UIImage *)watermarkImageWithBaseDrawing:(UIImage *)originalImage watermaskElements:(NSArray *)elements;
@end

NS_ASSUME_NONNULL_END
